<!DOCTYPE html>

<head>
    <meta charset="UTF-8">
    <style>
        div {
            width: 300px;
            height: 300px;
            /* background-color: chocolate; */
        }
    </style>
    <script src="../jQuery-3.6.3.min.js"> </script>
    <script>
        $(function () {
            $("div").click(function () {
                $(this).animate({
                    "width": "150px", "height": "150px"
                }, 1000, function () {
                    $(this).css("color", "red")
                });
            })
        })
    </script>
</head>

<body>
    <div>

    </div>
</body>

</html>